import type { RouteRecordRaw } from "vue-router";

export const routes: RouteRecordRaw[] = [
  {
    path: "/login",
    name: "Login",
    component: () => import("../views/auth/Login.vue"),
    meta: { requiresAuth: false },
  },
  {
    path: "/",
    redirect: "/main",
  },
  {
    path: "/main",
    component: () => import("../layout/MainLayout.vue"),
    meta: { requiresAuth: true },
    children: [
      {
        path: "",
        name: "Dashboard",
        component: () => import("../views/dashboard/Dashboard.vue"),
        meta: { title: "首页" },
      },
      {
        path: "/products/list",
        name: "ProductList",
        component: () => import("../views/products/List.vue"),
        meta: { title: "商品列表" },
      },
      {
        path: "/products/form",
        name: "AddProduct",
        component: () => import("../views/products/Form.vue"),
        meta: { title: "添加商品" },
      },
      {
        path: "/product_type/list",
        name: "ProductTypeList",
        component: () => import("../views/product_type/List.vue"),
        meta: { title: "商品类型列表" },
      },
      {
        path: "/product_type/form",
        name: "ProductTypeAdd",
        component: () => import("../views/product_type/Form.vue"),
        meta: { title: "添加商品类型" },
      }, 
      {
        path: "/products/inventory",
        name: "ProductInventory",
        component: () => import("../views/products/ProductInventory.vue"),
        meta: { title: "商品库存" },
      },
      {
        path: "/products/updown",
        name: "ProductsUpDown",
        component: () => import("../views/products/UpDown.vue"),
        meta: { title: "商品上下架" },
      },
      {
        path: "/orders/list",
        name: "OrderList",
        component: () => import("../views/orders/List.vue"),
        meta: { title: "订单列表" },
      },
      {
        path: "/orders/stat",
        name: "OrderStat",
        component: () => import("../views/orders/Stat.vue"),
        meta: { title: "订单统计" },
      },
      {
        path: "/orders/month",
        name: "AdminOrderMonth",
        component: () => import("../views/orders/Month.vue"),
        meta: { title: "订单统计" },
      },
      {
        path: "/orders/day",
        name: "AdminOrderDay",
        component: () => import("../views/orders/Day.vue"),
        meta: { title: "订单统计" },
      },
      {        path: "/orders/refund",        name: "AdminOrderRefund",        component: () => import("../views/orders/Refund.vue"),        meta: { title: "订单退款" },      },
      {        path: "/orders/refund-list",        name: "AdminOrderRefundList",        component: () => import("../views/orders/RefundList.vue"),        meta: { title: "退款记录" },      },
      {        path: "/orders/refund-detail/:id",        name: "AdminOrderRefundDetail",        component: () => import("../views/orders/RefundDetail.vue"),        meta: { title: "退款详情" },      }, 
      {
        path: "/seller_manage/orders/create",
        name: "OrderCreate",
        component: () => import("../views_seller/orders/Create.vue"),
        meta: { title: "在线点餐" },
      }, 
      {
        path: "/seller_manage/orders/statistics",
        name: "OrderStatistics",
        component: () => import("../views_seller/orders/Statistics.vue"),
        meta: { title: "订单统计" },
      },
      {
        path: "/seller_manage/orders/month",
        name: "OrderMonth",
        component: () => import("../views_seller/orders/Month.vue"),
        meta: { title: "订单统计" },
      },
      {
        path: "/seller_manage/orders/day",
        name: "OrderDay",
        component: () => import("../views_seller/orders/Day.vue"),
        meta: { title: "订单统计" },
      },
      {
        path: "/articles/list",
        name: "ArticleList",
        component: () => import("../views/articles/List.vue"),
        meta: { title: "文章列表" },
      },
      {
        path: "/articles/form",
        name: "AddArticle",
        component: () => import("../views/articles/Form.vue"),
        meta: { title: "添加文章" },
      },
      {
        path: "/settings",
        name: "Settings",
        component: () => import("../views_seller/settings/Settings.vue"),
        meta: { title: "系统设置" },
      },
      {
        path: "/settings/open",
        name: "SettingsOpen",
        component: () => import("../views_seller/settings/Open.vue"),
        meta: { title: "营业状态" },
      },
      {
        path: "/settings/printer",
        name: "SettingsPrinter",
        component: () => import("../views_seller/settings/Printer.vue"),
        meta: { title: "打印机设置" },
      },
      {
        path: "/settings/printeruk",
        name: "PrinterUk",
        component: () => import("../views/settings/Printer.vue"),
        meta: { title: "英文打印机设置" },
      },
      {
        path: "/settings/payment",
        name: "SettingsPayment",
        component: () => import("../views/settings/Payment.vue"),
        meta: { title: "支付设置" },
      }, 
      {
        path: "/settings/applet",
        name: "SettingsApplet",
        component: () => import("../views/settings/Applet.vue"),
        meta: { title: "小程序设置" },
      }, 
      {
        path: "/settings/map",
        name: "SettingsMap",
        component: () => import("../views/settings/Map.vue"),
        meta: { title: "地图设置" },
      }, 
      {
        path: "/seller/list",
        name: "SellerList",
        component: () => import("../views/seller/List.vue"),
        meta: { title: "商家列表" },
      },
      {
        path: "/seller/form",
        name: "SellerAdd",
        component: () => import("../views/seller/Form.vue"),
        meta: { title: "添加商家" },
      },
      {
        path: "/store/list",
        name: "StoreList",
        component: () => import("../views/store/List.vue"),
        meta: { title: "门店列表" },
      },
      {
        path: "/store/form",
        name: "StoreAdd",
        component: () => import("../views/store/Form.vue"),
        meta: { title: "添加门店" },
      },
      {
        path: "/seller_manage/store/list",
        name: "SellerManageStoreList",
        component: () => import("../views_seller/store/List.vue"),
        meta: { title: "门店列表" },
      },
      {
        path: "/seller_manage/store/form",
        name: "SellerManageStoreAdd",
        component: () => import("../views_seller/store/Form.vue"),
        meta: { title: "添加门店" },
      },
      {
        path: "/seller_manage/account/list",
        name: "SellerManageAccountList",
        component: () => import("../views_seller/account/List.vue"),
        meta: { title: "帐号列表" },
      },
      {
        path: "/seller_manage/account/form",
        name: "SellerManageAccountAdd",
        component: () => import("../views_seller/account/Form.vue"),
        meta: { title: "添加帐号" },
      },
      {
        path: "/users/list",
        name: "UserAdd",
        component: () => import("../views/user/List.vue"),
        meta: { title: "会员列表" },
      },
      {
        path: "/article_type/list",
        name: "ArticleTypeList",
        component: () => import("../views/article_type/List.vue"),
        meta: { title: "文章类型列表" },
      },
      {
        path: "/article_type/form",
        name: "ArticleTypeAdd",
        component: () => import("../views/article_type/Form.vue"),
        meta: { title: "添加文章类型" },
      }, 
      {
        path: "/seller_manage/products/updown",
        name: "SellerManageProductsUpDown",
        component: () => import("../views_seller/products/UpDown.vue"),
        meta: { title: "商家商品上下架" },
      },
      {
        path: "/seller_manage/products/list",
        name: "SellerManageProductsList",
        component: () => import("../views_seller/products/List.vue"),
        meta: { title: "商家商品" },
      },
      {
        path: "/seller_manage/products/form",
        name: "SellerManageProductsForm",
        component: () => import("../views_seller/products/Form.vue"),
        meta: { title: "商家商品" },
      },
      {
        path: "/attr/list",
        name: "AttrList",
        component: () => import("../views/attr/List.vue"),
        meta: { title: "属性及小料" },
      },
      {
        path: "/attr/form",
        name: "AttrForm",
        component: () => import("../views/attr/Form.vue"),
        meta: { title: "属性及小料" },
      },
      {
        path: "/attr/admin",
        name: "AttrAdmin",
        component: () => import("../views/attr/Admin.vue"),
        meta: { title: "属性管理" },
      },
      {
        path: "/mix/list",
        name: "MixList",
        component: () => import("../views/mix/List.vue"),
        meta: { title: "小料管理" },
      },
      {
        path: "/mix/form",
        name: "MixForm",
        component: () => import("../views/mix/Form.vue"),
        meta: { title: "小料管理" },
      },
      {
        path: "/seller_manage/orders/list",
        name: "SellerManageOrdersList",
        component: () => import("../views_seller/orders/List.vue"),
        meta: { title: "商家订单" },
      },
      {
        path: "/coupon/list",
        name: "CouponList",
        component: () => import("../views/coupon/List.vue"),
        meta: { title: "优惠券列表" },
      },
      {
        path: "/coupon/form",
        name: "CouponForm",
        component: () => import("../views/coupon/Form.vue"),
        meta: { title: "优惠券" },
      },
      {
        path: "/coupon_get/list",
        name: "CouponGetList",
        component: () => import("../views/coupon_get/List.vue"),
        meta: { title: "优惠券领取列表" },
      },
      {
        path: "/coupon_get/form",
        name: "CouponGetForm",
        component: () => import("../views/coupon_get/Form.vue"),
        meta: { title: "优惠券领取" },
      },
      {
        path: "/coupon_use/list",
        name: "CouponUseList",
        component: () => import("../views/coupon_use/List.vue"),
        meta: { title: "优惠券领取列表" },
      }, 
      {
        path:"/vip/half",
        name:"VipHalf",
        component: () => import("../views/vip/Half.vue"),
        meta: { title: "会员日半价" },
      },
      {
        path: "/users/money",
        name: "UsersMoney",
        component: () => import("../views/user/Money.vue"),
        meta: { title: "会员余额" },
      },
      {
        path: "/settings/keywords",
        name: "Keywords",
        component: () => import("../views/settings/Keywords.vue"),
        meta: { title: "关键词" },
      },
      {
        path: "/template/list",
        name: "TemplateList",
        component: () => import("../views/template/List.vue"),
        meta: { title: "小程序模板" },
      },
    ],
  },
];
